home *** CD-ROM | disk | FTP | other *** search
/ A Survey of Western Art / A Survey of Western Art.iso / mac / SETUP.INF < prev    next >
Text File  |  1995-02-02  |  7KB  |  197 lines

  1. ;;SETUP.INF file for Ebook Electronic Library of Art
  2. ;;this file is for the Survey of Western Art--Version 3
  3. SetVariable(ProgPath,"C:\TDC")
  4. SetVariable(ProgName,"SWA.EXE")
  5. SetVariable(InstallName, "Survey of Western Art")
  6. SetVariable(DataSpace,"1.7 Megabytes")
  7. SetVariable(ProgSpace,"1.1 Megabytes")
  8. SetVariable(EbookSize, 1 100 000)
  9. SetVariable(DataSize, 1 700 000)
  10. SetVariable(TitleName,"Survey of Western Art")
  11. SetVariable(IniName,"SWAEA.INI")
  12. GetCurPath (CurPath)
  13.  
  14. ; The following instructions are displayed several times so we put the
  15. ; text in a variable.
  16. ;
  17. SetVariable (InsAskPath,
  18.     "Modify the default path if necessary, and then click on {\b OK} or "
  19.     "press {\b Enter} to continue.  ")
  20. SetVariable (InsBadPath,
  21.     "The path is currently not valid.  You must specify a drive "
  22.     "letter, a colon, and a directory from the root of the drive.  ")
  23.  
  24. ; Set the title of all dialog windows.
  25. ;
  26. WindowTitle (<InstallName>" Setup")
  27.  
  28. ; Set the instruction text used in the initial instructions window.
  29. ; Add Help instructions if the file SETUP.HLP exists.
  30. ;
  31. SetVariable (InitialInstructions, 
  32.     "Click on {\b OK} or press {\b Enter} to continue.  "
  33.     "To abort the setup, click on the {\b Exit} button at the "
  34.     "bottom right corner of the screen, or press {\b F3}.  ")
  35. IfFileExistsGoto ("SETUP.HLP", AddHelpInstructions)
  36.     Goto (DisplayInitialMessage)
  37. AddHelpInstructions:
  38.     SetVariable (InitialInstructions, 
  39.         <InitialInstructions> "You can always obtain help by "
  40.         "clicking on the {\b Help} button or pressing {\b F1}.  ")
  41.  
  42. ; Display the initial message.
  43. ;
  44. DisplayInitialMessage:
  45. DisplayMessage (
  46. "The Setup program will install the " <InstallName> " on your hard disk."
  47. "  There are two options available for installation:%n%n"
  48.  
  49. "Run " <InstallName> " Entirely off of the CD-ROM.%n%n"
  50. "Copy " <ProgName> " to your Hard Disk to improve execution speed.%n%n",
  51. <InitialInstructions>)
  52.  
  53. ;ask if user wants to copy the ebook files to hard disk
  54. AskYesNo (Prompt, "Yes",
  55.     "The " <TitleName> " files require about " <ProgSpace> " of disk "
  56.     "space.  Would you like to copy them to your hard disk?",
  57.     <TitleName> " Can be run from the CD-ROM, but copying it to your "
  58.     "Hard disk will improve execution speed.\par\par"
  59.     "Click on {\b Yes} or press {\b 'Y'} to copy the " <TitleName> 
  60.     " files.\par "
  61.     "Click on {\b No} or press {\b 'N'} to proceed without copying the "
  62.     <TitleName> " source files.")
  63. IfEqualGoto (<Prompt>, "No", DontPromptTitlePath)
  64.  
  65.  
  66.  
  67.  
  68. AskAgain:
  69.  
  70.  
  71. ; Ask for where the Ebook files should be installed.
  72. ;
  73. PromptEbookPath:
  74. PromptPath (ProgPath, <ProgPath>,
  75.     "Where should Setup install the Program files?",
  76.     <InsAskPath>, <InsBadPath>)
  77.  
  78.  
  79. ; Don't allow Ebook to be installed in the Windows directory
  80. ;
  81. GetWinPath (WinPath)
  82. GetWinSystemPath (SystemPath)
  83. IfNotEqualGoto (<ProgPath>, <WinPath>, CheckSpace)
  84. DisplayMessage (
  85.     "You cannot install this program into the Windows directory.  "
  86.     "Please enter another directory.",
  87.     "Click on {\b OK} or press {\b Enter} to enter another directory "
  88.     "for this program.")
  89. Goto (PromptEbookPath)
  90.  
  91. ; Check if there is enough space to install the Ebook files.
  92. ;
  93. CheckSpace:
  94. GetSpaceAvailable (SpaceAvailable, <ProgPath>)
  95. IfLowerGoto (<EbookSize>, <SpaceAvailable>, EbookPathOK)
  96. AskYesNo (Prompt, "Yes",
  97.     "There may not be enough space to install the "<InstallName>" Files."
  98.     "  Would you like to enter a new path for the files?  ",
  99.     "Click on {\b Yes} or press {\b 'Y'} to enter a new path for the "
  100.     "program files.\par "
  101.     "Click on {\b No} or press {\b 'N'} to continue anyway.\par "
  102.     "Click on the {\b Exit} button or press {\b F3} to exit Setup.  "
  103.     "You may wish to exit Setup and make some more space on your hard "
  104.     "disk.  Run Setup again when there is enough space on your hard "
  105.     "disk.  ")
  106. IfEqualGoto (<Prompt>, "Yes", PromptEbookPath)
  107.  
  108. EbookPathOK:
  109. ;create the subdirectory
  110. MakePath(<ProgPath>)
  111. ;copy the ebook files
  112. OpenCopyProgress(
  113.     "Setup is copying the "<InstallName> " Program files.",
  114.     "Please wait while Setup is copying files.")
  115.  
  116. CopyFile("SWA.EXE",<ProgPath> "SWA.EXE", 250000)
  117. CopyFile("TITLE.DIB",<ProgPath> "TITLE.DIB", 93000)
  118. CopyFile("TITLE.WAV",<ProgPath> "TITLE.WAV", 550000)
  119. CopyFile("TDCEEA.HLP",<ProgPath> "TDCEEA.HLP",50000)
  120. CopyFile("INTRO.EXE",<ProgPath> "INTRO.EXE",50000)
  121. CopyFile("TDC.BMP",<ProgPath> "TDC.BMP",50000)
  122. CopyFile("TDC.ICO",<ProgPath> "TDC.ICO",50000)
  123.  
  124. CloseCopyProgress()
  125.  
  126.  
  127.  
  128.  
  129.  
  130. SetVariable(DataPath,<CurPath>"DATA")
  131. GoTo(EbookCopied)
  132. DontPromptTitlePath:
  133. SetVariable(DataPath,<CurPath>"DATA")
  134. SetVariable(ProgPath,<CurPath>)
  135. GoTo(EbookNotCopied)
  136.  
  137. EbookCopied:
  138. SetVariable(ProgPath,<ProgPath>)
  139. EbookNotCopied:
  140.  
  141. ;copy the ebook.ini file and add the paths
  142. AddToProfileIni(<IniName>,"PATHS","CDROM",<CurPath>)
  143. AddToProfileIni(<IniName>,"PATHS","PICTURE",<CurPath>"PIX")
  144. AddToProfileIni(<IniName>,"PATHS","DATA",<CurPath>"DATA")
  145. AddToProfileIni(<IniName>,"PATHS","INDEX",<CurPath>"DATA")
  146. AddToProfileIni(<IniName>,"PATHS","PSTAMPPATH",<CurPath>"DATA")
  147. AddToProfileIni(<IniName>,"PATHS","MIDIPATH",<CurPath>"MIDI")
  148.  
  149. ;add the info for this title to ebook.ini
  150. AddToProfileIni(<IniName>,"EEAVOL1","Title","A Survey of Western Art")
  151. AddToProfileIni(<IniName>,"EEAVOL1","Card","WINCARD")
  152. AddToProfileIni(<IniName>,"EEAVOL1","NumberIndex","6")
  153. AddToProfileIni(<IniName>,"EEAVOL1","IndexNames","ARTIST,TITLE,MEDIUM,DATE,OBJ,CSCHOOL");
  154. AddToProfileIni(<IniName>,"EEAVOL1","PStamp","1")
  155. AddToProfileIni(<IniName>,"EEAVOL1","BrowseMode","0")
  156. AddToProfileIni(<IniName>,"EEAVOL1","SplitPath","1")
  157. AddToProfileIni(<IniName>,"EEAVOL1","NumberPixColumns","5")
  158. AddToProfileIni(<IniName>,"EEAVOL1","NumberPixRows","3")
  159. AddToProfileIni(<IniName>,"EEAVOL1","NumberMIDI","4")
  160. AddToProfileIni(<IniName>,"EEAVOL1","MidiFiles","PRIMAVER,PROFUMIE,LASIRENA,CANTENA")
  161. AddToProfileIni(<IniName>,"EEAVOL1","MidiTitles","Ecco la Primavera,Canto de'Profumieri,Balletto la Sirena,La Cantena D'Amore")
  162.  
  163.  
  164.  
  165.  
  166. ;add the program group
  167. OpenProgManProgress("Setup is adding a Program Manager Group",
  168.     "Please wait while Setup adds the Group")
  169. OpenProgManGroup("TDC Interactive")
  170. AddProgManItem("A Survey of Western Art",<ProgPath>"Intro.exe SWA.EXE EEAVOL1",
  171.     <ProgPath>"TDC.ICO",0)
  172. CloseProgManProgress()
  173.  
  174. ;cleanup
  175.  
  176. IfIncompleteGoto(NotInstalled)
  177.  
  178. Installed:
  179.     SetVariable (Message, 
  180.         "The Setup program has successfully installed the "
  181.         <TitleName> ".%n%n")
  182.  
  183. GoTo(Exit)
  184.  
  185. NotInstalled:
  186.     SetVariable (Message,
  187.         "Setup has finished, but the installation was incomplete.  "
  188.         "You should correct any problems (such as insufficient disk "
  189.         "space, missing source files, or locked directories) and run "
  190.         "Setup again.%n%n")
  191.  
  192. Exit:
  193.  
  194. DisplayMessage (<Message>, 
  195.     "Click on {\b OK} or press {\b Enter} to return to the "
  196.     "Program Manager.")
  197.